<template>
    <!-- BEGIN HEADER MENU -->
    <div class="nav-collapse collapse navbar-collapse navbar-responsive-collapse">
        <ul class="nav navbar-nav">
            <li class="dropdown dropdown-fw" :class="{ 'open': page=='dashboard' }" v-if="!authorize(['USER'])">
                <router-link to="/dashboard">
                    <i class="icon-home"></i> 总览 
                </router-link>
            </li>
            <li class="dropdown dropdown-fw" :class="{ 'open': page=='passport' }" v-if="!authorize(['USER'])">
                <router-link to="/passport">
                    <i class="icon-puzzle"></i> 通行证列表
                </router-link>
            </li>
            <li class="dropdown dropdown-fw" :class="{ 'open': page=='compete' }" v-if="!authorize(['USER'])">
                <router-link to="/compete">
                    <i class="icon-puzzle"></i> 比赛列表
                </router-link>
            </li>
            <li class="dropdown dropdown-fw" :class="{ 'open': page=='show' }" v-if="!authorize(['USER'])">
                <router-link to="/show">
                    <i class="icon-puzzle"></i> 演出列表
                </router-link>
            </li>            
            <li class="dropdown dropdown-fw" :class="{ 'open': page=='ticket' }" v-if="!authorize(['USER'])">
                <router-link to="/ticket">
                    <i class="icon-puzzle"></i> 门票列表
                </router-link>
            </li>
            <li class="dropdown dropdown-fw" :class="{ 'open': page=='hotel' }" v-if="!authorize(['USER'])">
                <router-link to="/hotel">
                    <i class="icon-puzzle"></i> 食宿列表
                </router-link>
            </li>
            <li class="dropdown dropdown-fw" :class="{ 'open': page=='payment' }" v-if="!authorize(['USER'])">
                <router-link to="/payment">
                    <i class="icon-puzzle"></i> 订单列表
                </router-link>
            </li>
            <li class="dropdown dropdown-fw" :class="{ 'open': page=='log' }" v-if="!authorize(['USER'])">
                <router-link to="/log">
                    <i class="icon-puzzle"></i> 日志列表
                </router-link>
            </li>
            <li class="dropdown dropdown-fw" :class="{ 'open': page=='tradeaudit' }" v-if="!authorize(['USER'])">
                <router-link to="/tradeaudit">
                    <i class="icon-puzzle"></i> 交易日志
                </router-link>
            </li>            
            <li class="dropdown dropdown-fw" :class="{ 'open': page=='session' }" v-if="!authorize(['USER'])">
                <router-link to="/session">
                    <i class="icon-puzzle"></i> 场次安排
                </router-link>
            </li>            
            <li class="dropdown dropdown-fw" :class="{ 'open': page=='setting' }" v-if="!authorize(['USER'])">
                <router-link to="/setting">
                    <i class="icon-puzzle"></i> 比赛设置
                </router-link>
            </li>
        </ul>
    </div>
    <!-- END HEADER MENU -->
</template>

<script>
export default {
    computed: {
        page() {
            return this.$store.state.curPage;
        }
    }
}
</script>

<style>
.page-header .navbar .navbar-nav > li > a {
    padding: 20px 30px;
}
</style>
